package com.sptpc.service.impl;

import com.sptpc.dao.UserMapper;
import com.sptpc.domain.Reader;
import com.sptpc.service.UserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	UserMapper userMapper;


	@Override
	public Reader findUserByIdAndPwd(String id, String password) {
		return userMapper.findUserByIdAndPwd(id , password);
	}

	@Override
	public int updateAllById(Reader reader) {
		return userMapper.updateAllById(reader);
	}

	@Override
	public int updatePwdById(String newpass, String id , String pass) {
		return userMapper.updatePwdById(newpass,id,pass);
	}

	@Override
	public int addReader(Reader reader) {
		return userMapper.addReader(reader);
	}
}
